<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <h1>队列</h1>
    <h2>队列：一种数据格式，先进先出</h2>

    <script>
        class Stack {
            constructor () {
                this._stacklist = [];
            }
            push (data) {
                this._stacklist.push(data);
            }
            pop () {
                return this._stacklist.shift();
            }
        }
    </script>
</body>

</html>